package com.hfy.music;

import com.hfy.feign.IUserClient;
import com.hfy.music.ws.WsListenMusicTogether;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.ConfigurableApplicationContext;

/**
 * @ author 韩
 * time: 2024/5/9 21:51
 */
@SpringBootApplication
@EnableDiscoveryClient
@EnableFeignClients(clients = {IUserClient.class})
public class MusicServiceMusicApplication {
    public static void main(String[] args) {
        SpringApplication springApplication = new SpringApplication(MusicServiceMusicApplication.class);
        ConfigurableApplicationContext configurableApplicationContext = springApplication.run(args);
        //解决WebSocket不能注入的问题
        WsListenMusicTogether.setApplicationContext(configurableApplicationContext);
    }

}
